<?php include Kohana::find_file('classes', 'util');?>
<!-- Seednia home -->
<h2>Post Test page</h2>

<script type="text/javascript">
// FYI jQuery: multiple $(document).ready() is possible.
$(document).ready(function() {
	initHomeForm();
});
</script>

<form name="FormPost" action="http://localhost:8080/seednia-webapp/ws/PostServiceRest/insert?accessToken=123" method="POST">
<fieldset>
	<input id="creatorSid" id="creatorSid" />
	<textarea id="body" name="body"></textarea>
	<br />
	<input type="submit" name="submit" class="button" id="submit_btn" value="Send" /> 
</fieldset>
</form>

<?php foreach ($posts as $post) {?>
<p>
<div>
<?php echo datetime_parse_from_std($post->{'@createDate'})->format('y-m-d'). ' ('. time_ago($post->{'@createDate'}).' ago)'; ?>
<?php echo $post->body; ?></div>

<?php } ?>